﻿@model CarparkIMS_CMS.Models.CameraConfigModel

@{
    ViewData["Title"] = "Create";
}
<h1>Create</h1>

<h4>Camera/Door Mapping</h4>
<hr />
<div class="row">
    <div class="col-md-4">
        <form asp-action="Create">
            <div class="form-group">
                <label asp-for="CameraIP" class="control-label"></label>
                <input asp-for="CameraIP" class="form-control"/>
                <span asp-validation-for="CameraIP" class="text-danger"></span>
            </div>
            <div class="form-group">
                <label asp-for="ParkingPlaceSharpNumber" class="control-label"></label>
                <input asp-for="ParkingPlaceSharpNumber" class="form-control" />
                <span asp-validation-for="ParkingPlaceSharpNumber" class="text-danger"></span>
            </div>
            <div class="form-group">
                <label asp-for="DoorID" class="control-label"></label>
                <select asp-for="DoorID" class="form-control" asp-items="Model.DoorList"></select>
                <span asp-validation-for="DoorID" class="text-danger"></span>
            </div>
            <div class="form-group">
                <label asp-for="TransactionTypeID" class="control-label"></label>
                <select asp-for="TransactionTypeID" class="form-control" asp-items="Model.TransactionTypeList"></select>
                <span asp-validation-for="TransactionTypeID" class="text-danger"></span>
            </div>
           <div class="form-group" hidden>
                <label class="form-check-label">
                    @Html.DisplayNameFor(model => model.ParkingNoCalcType)
                </label>
                <input class="form-check-input" asp-for="ParkingNoCalcType" value="0" />
                <!--default value = 0 -->
            </div>
            <div class="form-group">
                <input type="submit" value="Create" class="btn btn-primary" />
            </div>
        </form>
    </div>
</div>

<div>
    <a asp-action="Index">Back to List</a>
</div>

@section Scripts {
    @{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}
